<!DOCTYPE html>

<html>
    <head>
        <title>#{get 'title' /}</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/main.css'}">
        #{get 'moreStyles' /}
        <link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}">
        <script src="@{'/public/javascripts/jquery-1.4.2.min.js'}" type="text/javascript" charset="utf-8"></script>
        #{get 'moreScripts' /}
    </head>
    <body>
    	<div id="center">
	    	<div id="main">
	    		<div id="header">
		    		<h1 class="logo"><a href="@{Application.index()}">Find Food</a></h1>
		    		<div id="nav">
		    			<!--<a href="@{Find.view()}">Find Food</a>-->
		    			<a href="@{Application.about()}">About</a>
		    		
			    		#{ifnot user}
						<a href="@{Application.login()}">Log In</a>
						#{/ifnot}
						
						#{else}
						#{if user.username }
						<a class="name">Welcome, ${user.username}!</a>
						#{/if}
						#{else}
						<a class="name">Welcome!</a>
						#{/else}
						<a href="@{Profile.edit()}">Edit Profile</a>
						<a href="@{Application.logout()}">Log Out</a>
						#{/else}
					</div>
		    	</div>
			    #{if flash.success}
			    	<div class="messageWrapper"><div class="success">${flash.success}</div></div>
				#{/if}
				#{if flash.error}
			    	<div class="messageWrapper"><div class="error">${flash.error}</div></div>
				#{/if}
				<div id="content" class="#{get 'contentClass' /}">
		        	#{doLayout /}
		        </div>
	        </div>
        </div>
    </body>
</html>
